<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PointGoodsOrder extends Model
{
    public function pointGoods()
    {
    	return $this->belongsTo(PointGoods::class, 'point_goods_id', 'id');
    }
    
    public function store()
    {
    	return $this->belongsTo(Store::class)->with(['detail:id,store_id,name']);
    }
    
    public function goods()
    {
    	return $this->belongsTo(PointGoods::class,'point_goods_id', 'id');
    }
}
